home *** CD-ROM | disk | FTP | other *** search
/ Creative Computers / Creative Computers CD-ROM, Volume 1 (Legendary Design Technologies, Inc.)(1994).iso / commercial / inovatronics / edgedemo / edgeeditor / rexx / menu_editkeymacro.edge < prev    next >
Text File  |  1994-11-17  |  1KB  |  61 lines

  1. /*
  2. ** $VER: EditKeyMacro.edge 1.0 (Friday 22-Oct-93 12:59:14)
  3. **
  4. ** Edit a keyboard command's rexx macro
  5. **
  6. ** Written by Thomas liljetoft & Inovatronics
  7. */
  8.  
  9. options results
  10.  
  11. /* get the users error-report level */
  12. getenvvar _ge_errlevel
  13. errlevel = result
  14.  
  15. /* ask for the key-description to edit */
  16. 'requestkey' title '"Enter key to edit"'
  17. if RC==0 then do
  18.  
  19.     /* ok, now get the command currently installed on the key */
  20.     key = result
  21.     'keyboard' key ask
  22.     if RC==0 then do
  23.  
  24.         /* is this a file? */
  25.         if index(result,':')~=0 then do
  26.             
  27.             /* remember and see if the file is here */
  28.             name=result
  29.             if exists(name) then do
  30.                 
  31.                 /* is the current window empty? */
  32.                 getenvvar _fe_size
  33.                 if result>0 then do
  34.  
  35.                     /* open a new window and then load the file */
  36.                     new
  37.                     if RC==0 then do
  38.                         address value result
  39.                         open '"'name'"'
  40.                     end
  41.                 end
  42.                 else do
  43.                     /* open into this window then */
  44.                     open '"'name'"'
  45.                 end
  46.             end
  47.             
  48.             /* tell the user we could not find the file */
  49.             else requestnotify 'Could not find' name
  50.         end
  51.     end
  52.  
  53. if RC >= errlevel then do
  54.  
  55.     /* something went wrong enought to be reported so report */
  56.     'fault'
  57.     'requestnotify' result
  58.     end
  59.  
  60. exit(0)
  61.